<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
    <script>
        function makePower(power) {
          return function(number) {
            return Math.pow(number, power)
          }
        }

        var power2 = makePower(2)
        let power3 = makePower(3)

        console.log(power2(2))
        console.log(power3(2))
        console.log(power3(3))
    </script>
</body>
</html>